<?php /* Template Name: Membros */ ?>
<?php get_header(); ?>

<style>
<!--
/* Tooltip */
a.dcontexto            {position: relative; font-size: 10px; padding: 0; color: #039; text-decoration: none; cursor: text; z-index: 24;}
a.dcontexto:hover      {background: transparent; z-index: 25;}
a.dcontexto span       {display: none;}
a.dcontexto:hover span {display: block; position: absolute; width: 200px; height: 30px; top: 1em; text-align: left; left: 0em; font-size: 10px; padding: 5px; background: #eff; color: #000; }
-->
</style>



<body>

<div id="tudo">
<div id="topo"><?php include_once MODULOS.'/topo.php'; ?></div><!-- Fim div topo -->
<?php do_vertical_space('20'); ?>

<div id="corpo">
	
	
	<div id="miolo">
		<?php do_vertical_space('15'); ?>
		<div class="breadcrumb"><?php the_breadcrumb(); ?></div>
		<?php do_vertical_space('15'); ?>
		<h1 class="font-azul">Membros do AvesPT</h1>
		<?php do_vertical_space('15'); ?>
		
		
		<div id="membro-conteiner">
			<?php 
			include_once PDO.'/MembroPDO.class.php';
			$us = new MembroPDO();
			$linha = $us->busca_membro();
			$aux_membro = 0;
			
			foreach ($linha as $key) { 
				$aux_membro = $aux_membro + 1;
				if ($aux_membro < 5) { 
					if ($aux_membro == 1) { ?>
					<div style="width: 308px; float: left;" >
					<?php 
					}
					?>
					<div style="width: 308px; float: left;">
						<div class="membro-conteiner-left">
							<div class="membro-thumb" style="float: left;"><img src="<?php echo get_gravatar(utf8_encode($key['email']));?>" alt="" width="75" height="75" /></div>
							<h2 style="font-size: 12px; margin: 5px 0 0 85px;"><a class="font-azul"><?php echo ucwords(strtolower (utf8_encode($key['nome']))); ?></a></h2>
							<?php 
							do_vertical_space('5');
							if (($key['telefone'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/mobile_phone.png" width="20" height="20" /><span>Telefone: <?php echo utf8_encode($key['telefone']); ?></span></a></div>	
							<?php 
							} if (($key['email'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="mailto: <?php echo $key['email'];?>" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/email.png" width="20" height="20" /><span>Email: <?php echo utf8_encode($key['email']); ?></span></a></div>	
							<?php 
							} if (($key['url'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="<?php echo utf8_encode($key['url']); ?>" target="_blank" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Página web: <?php echo utf8_encode($key['url']); ?></span></a></div>	
							<?php 
							} if (($key['clube'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['clube']); ?></span></a></div>	
							<?php 
							} if (($key['club2'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['club2']); ?></span></a></div>	
							<?php 
							} if (($key['club3'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['club3']); ?></span></a></div>	
							<?php 
							}
							?>
							<br />
							<p style="font-size: 11px; color: #9f9f9f; float: none; margin: 5px 0 0 85px;">Concelho: <span class="font-azul"><?php echo utf8_encode($key['descricao']); ?></span></p>						
						</div><!-- Fim div membro-conteiner left -->
						<?php do_vertical_space('20'); ?>
					</div>
					<div class="clr"></div>								
					<?php
					if ($aux_membro == 4) { ?>
					</div>
					<?php 
					} 
				} 
				if ($aux_membro == 4 ) { ?>
					<div style="width: 308px; float: right;" >	
						<div style="width: 308px; float: right; margin: 0;">
							<div id="membro-destaque">
								<div style="width: 308px; height: 292px; margin: 0; "><img alt="" src="<?php echo bloginfo('template_directory')?>/images/passaros/passaro-15.png" width="308" height="292" /></div>
								<div style="width: 308px; height: 75px; margin: 0; background-color: #efefef; ">
									<?php do_vertical_space('5'); ?>
									<h2 style="font-size: 18px; margin: 0; "><a href="" class="font-azul">O factor diluido e a sua interacção com o factor Ino em Agapornis personatus</a></h2>
								</div>
							</div>
						</div>
					</div>
					<div class="clr"></div>
					<div style="width: 630px; height: 100px; background-color: #efefef;"></div>
					<?php do_vertical_space('20'); ?>
				<?php 
				}
				if ($aux_membro > 4 && ($aux_membro%2) == 1) { ?>
					<div style="width: 308px; float: left;">
						<div class="membro-conteiner-left">
							<div class="membro-thumb" style="float: left;"><img src="<?php echo get_gravatar(utf8_encode($key['email']));?>" alt="" width="75" height="75" /></div>
							<h2 style="font-size: 12px; margin: 5px 0 0 85px;"><a class="font-azul"><?php echo ucwords(strtolower (utf8_encode($key['nome']))); ?></a></h2>
							<?php 
							do_vertical_space('5');
							if (($key['telefone'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/mobile_phone.png" width="20" height="20" /><span>Telefone: <?php echo utf8_encode($key['telefone']); ?></span></a></div>	
							<?php 
							} if (($key['email'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="mailto: <?php echo $key['email'];?>" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/email.png" width="20" height="20" /><span>Email: <?php echo utf8_encode($key['email']); ?></span></a></div>	
							<?php 
							} if (($key['url'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="<?php echo utf8_encode($key['url']); ?>" target="_blank" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Página web: <?php echo utf8_encode($key['url']); ?></span></a></div>	
							<?php 
							} if (($key['clube'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['clube']); ?></span></a></div>	
							<?php 
							} if (($key['club2'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['club2']); ?></span></a></div>	
							<?php 
							} if (($key['club3'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['club3']); ?></span></a></div>	
							<?php 
							}
							?>
							<br />
							<p style="font-size: 11px; color: #9f9f9f; float: none; margin: 5px 0 0 85px;">Concelho: <span class="font-azul"><?php echo utf8_encode($key['descricao']); ?></span></p>						
						</div><!-- Fim div membro-conteiner left -->
				    	<?php do_vertical_space('20'); ?>										 
					</div>				
				<?php
				} 
				if ($aux_membro > 4 && ($aux_membro%2) == 0) { ?>
					<div style="width: 308px; float: right;">
						<div class="membro-conteiner-left">
							<div class="membro-thumb" style="float: left;"><img src="<?php echo get_gravatar(utf8_encode($key['email']));?>" alt="" width="75" height="75" /></div>
							<h2 style="font-size: 12px; margin: 5px 0 0 85px;"><a class="font-azul"><?php echo ucwords(strtolower (utf8_encode($key['nome']))); ?></a></h2>
							<?php 
							do_vertical_space('5');
							if (($key['telefone'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/mobile_phone.png" width="20" height="20" /><span>Telefone: <?php echo utf8_encode($key['telefone']); ?></span></a></div>	
							<?php 
							} if (($key['email'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="mailto: <?php echo $key['email'];?>" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/email.png" width="20" height="20" /><span>Email: <?php echo utf8_encode($key['email']); ?></span></a></div>	
							<?php 
							} if (($key['url'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="<?php echo utf8_encode($key['url']); ?>" target="_blank" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Página web: <?php echo utf8_encode($key['url']); ?></span></a></div>	
							<?php 
							} if (($key['clube'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['clube']); ?></span></a></div>	
							<?php 
							} if (($key['club2'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['club2']); ?></span></a></div>	
							<?php 
							} if (($key['club3'])) { ?>
								<div style="margin: -2px 2px auto 7px; float: left"><a href="" class="dcontexto"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/icons/globe.png" width="20" height="20" /><span>Coletividade: <?php echo utf8_encode($key['club3']); ?></span></a></div>	
							<?php 
							}
							?>
							<br />
							<p style="font-size: 11px; color: #9f9f9f; float: none; margin: 5px 0 0 85px;">Concelho: <span class="font-azul"><?php echo utf8_encode($key['descricao']); ?></span></p>						
						</div><!-- Fim div membro-conteiner left -->
				    	<?php do_vertical_space('20'); ?>										 
					</div>				
				<?php
				}
				if ($aux_membro == 16) { 
					break;
				}	
				
			}// Fim forech
			?> 
		
		
		
		</div><!-- Fim div membro-conteiner -->
	
	
	
	</div><!-- Fim div miolo -->
	
	
	<div id="direita">
		<?php dynamic_sidebar( 'Lateral Direita Home' ); ?>
		<?php do_vertical_space('20');?>
	</div><!-- Fim div coluna_direita -->

	
</div><!-- Fim div corpo -->
	
<?php do_vertical_space('20'); ?>	

<div class="cont-miolo-pub"><?php add_google_pub_bloco_2x468x60 (); ?></div>
<?php do_vertical_space('20'); ?>		

</div><!-- Fim div tudo -->
<?php get_footer(); ?>

</body>

</html>